import { defineStore } from "pinia";
import { ref } from "vue";
import { setTheme } from '@/theme/changeTheme'

export const useBaseStore = defineStore('base',()=>{
  const htmlScale = ref(1)
  const theme = ref(localStorage.getItem('theme') || 'dark');
  function setHtmlScaleStore(scale:number){
    htmlScale.value = scale
  }
  function setThemeStore(t:string){
    // theme.value = t
    setTheme(t);
  }
  return { htmlScale,theme,setHtmlScaleStore,setThemeStore }
});